<!--
 * @Date: 2023-04-18 15:23:37
 * @LastEditTime: 2023-09-12 17:35:05
 * @FilePath: /wkw/src/views/withdrawalCoinLogs/index.vue
 * 介绍:
-->
<route lang="json">
{
  "meta": {
    "title": "t('ti-bi-ji-lu')"
  }
}
</route>
<script lang="ts" setup>
import { apiWithdrawCoinLogs, ApiWithdrawCoinLogs } from "@@/api/transaction/list";
import { fixedDecimals, omitText } from "@@/utils/tools/format";
import dayjs from "dayjs";
import { txidStatus } from "@@/enum/globalEnum";
</script>
<template>
  <CpageView>
    <CrequestList :api="apiWithdrawCoinLogs" pull-refresh>
      <template #item="{ item }: { item: ApiWithdrawCoinLogs.DataItem }">
        <Ccard class="MT-md T-S-sm">
          <Cgrid
            col="auto 1fr 1fr"
            row-gap="var(--gap-xs)"
            col-gap="var(--gap-sm)"
            auto-flow="column"
            justify="start"
          >
            <CgridItem row="1/span 2">
              <Rimage size="4em" :src="item.coin?.logo" />
            </CgridItem>
            <CgridItem class="T-S-md">
              {{ item.coin?.code }}
            </CgridItem>
            <CcopyText :copy-text="item.txid">
              {{ omitText(item.txid) }}
            </CcopyText>
            <CgridItem justify="end">
              {{ dayjs(item.created_at).format("YYYY-MM-DD HH:mm:ss") }}
            </CgridItem>
            <CgridItem justify="end">
              <CstateTag :value="item.status" :enum="txidStatus">
                {{ fixedDecimals(item.number, 4) }}
              </CstateTag>
            </CgridItem>
          </Cgrid>
        </Ccard>
      </template>
    </CrequestList>
  </CpageView>
</template>
<style lang="scss" scoped></style>
